package com.zust.zst.dao.mapper.teacher;

import com.zust.zst.common.dto.teacher.AddTeacherDTO;
import com.zust.zst.common.dto.teacher.Teacher;
import com.zust.zst.common.dto.teacher.UpdateTeacherDTO;
import com.zust.zst.common.vo.teacher.UpdateVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface TeacherMapper {
    //展示全体教师名单
    List<Teacher> showAllTeachers(@Param("startIndex") int startIndex, @Param("pageSize") int pageSize);
    //通过教师工号获取教师信息
    List<Teacher> getTeacherById(@Param("uid") int uid);
    //通过教师姓名获取教师信息
    List<Teacher> getTeacherByName(@Param("name") String name);
    //手动添加教师信息
    int addTeacher(@Param("addTeacherDTO")AddTeacherDTO addTeacherDTO);
    //删除表中的教师信息
    int deleteTeacher(@Param("uid") int uid);
    //更新表中的教师信息
    int updateTeacher(@Param("updateVO")UpdateVO updateVO);
    //获取表中的记录总数
    int getTotalTeacher();
}
